/**
 * 面试总结
 */
import React from 'react';
import { withRouter, router } from 'umi';
import helper from '@/utils/auth/helper';
import { Icon } from '../../components';

const { checkCode } = helper;

function InterviewSummaryOperate({ candidateId, arrangeId, ...rest }) {
    const handleJump = React.useCallback(() => {
        history.push({
            pathname: '/office/personnelManagement/recruitment/interview/conclusion',
            query: { candidateId, arrangeId }
        });
    }, [candidateId, arrangeId]);
    return (
        (checkCode('office:recruitment:course:interview:summary:add') ||
            checkCode('office:recruitment:course:interviewMgt:summary:add')) && (
            <Icon title="面试总结" type="listfunction_edit_icon_default" onClick={handleJump} {...rest} />
        )
    );
}
export default withRouter(InterviewSummaryOperate);
